<?php

define("MQTT_TopicData", "/Data");
define("MQTT_TopicGatewaySync", "GatewaySync");
define("MQTT_TopicGatewaySyncRequest", "GatewaySyncRequest");
define("MQTT_TopicGatewayWill", "GatewayWill");
define("MQTT_TopicNodeSync", "/NodeSync");
define("MQTT_TopicControlNode", "/ControlNodeCmd");
define("MQTT_TopicNodeSyncRequest", "/NodeSyncRequest");
define("MQTT_TopicSyncNodeStatus", "/SyncNodeStatus");
define("MQTT_TopicNodeLocalSyncRequest", "/NodeLocalSyncRequest");
define("MQTT_TopicNodeLocalSync", "/NodeLocalSync");

global $_GCONFIG;
$_GCONFIG = array();
$_GCONFIG["debug"]["state"] = true;

$_GCONFIG["db"]["user"] = "root";
$_GCONFIG["db"]["passwd"] = "root";
$_GCONFIG["db"]["host"] = "localhost";
$_GCONFIG["db"]["dbname"] = "HW_CUP_WEB";
$_GCONFIG["db"]["port"] = 3306;

$_GCONFIG["access"]["accesskey"] = "U6qLfwkDfU";
$_GCONFIG["access"]["applicationkey"] = "md8VS4Jb8g";



function console(string $msg)
{
    echo "<script>console.log('$msg')</script>";
}
